/**
 * 2017年12月21日
 */
package exp.paper.core;

import java.util.ArrayList;
import java.util.List;

import exp.algorithm.sic.InstanceFeatureVectors;
import exp.algorithm.sic.ScalePeak;
import exp.algorithm.sic.Sifc;
import exp.algorithm.sic.TimeSeries;
import exp.algorithm.sic.feature.FeatureVector;
import weka.core.Instance;
import weka.core.Instances;

/**
 * @author Alex
 *
 */
public class FeaturePointDetecter {
	LightPyramid lp = new LightPyramid();
	FeatureMaker fm = new FeatureMaker();
	public InstanceFeatureVectors detectInstance(Instance inst){
		return null;
	}
	public List<InstanceFeatureVectors> detectInstances(Instances insts){
		List<TimeSeries> list = TimeSeries.fromInstance(insts);
		List<InstanceFeatureVectors> temp = new ArrayList<InstanceFeatureVectors>();
		for(TimeSeries ts:list){
			LightPyramid lpr = new LightPyramid();
			lpr.buildOctaves(ts);
//			List<ScalePeak> peaks = lpr.findPeaks();
			//一个实例中,最终检测到的特征向量
			List<FeatureVector> fvs = null;
//			if(minMax!=null){
//				if(fvs.size()<minMax[0]) minMax[0] = fvs.size();
//				if(fvs.size()>minMax[1]) minMax[1] = fvs.size();
//			}
			//将一个TimeSereis中的所有的octave中的所有的ScalePeak转换成InstanceStatisticsAtts实例
			InstanceFeatureVectors vecs = new InstanceFeatureVectors(fvs);
			vecs.classValue = ts.classVal;
			//保存InstanceStatisticsAtts以备后面使用
			temp.add(vecs);
		}
		
		return null;
	}
}
